package exDraw;

import exDraw.SpinLayout.OnItemSelectedListener;
import rz.dmc.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

public class CardActivity extends Activity 
{
	@Override
	public void onCreate(Bundle savedInstanceState) 
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.spin_service);
		
		SpinLayout spinLayout = (SpinLayout)findViewById(R.id.spinLinear);
		spinLayout.setMaxDegree(90.0 / 4 *3.5);
		spinLayout.setmOnItemSelectedListener(new OnItemSelectedListener() 
		{
			@Override
			public void onItemSelected(View v) 
			{
				int id = v.getId();
				
				switch (id)
				{
					case R.id.imageView1:
						Toast.makeText(CardActivity.this, "1번 선택", 1000).show();
						break;
					case R.id.imageView2:
						Toast.makeText(CardActivity.this, "2번 선택", 1000).show();
						break;
					case R.id.imageView3:
						Toast.makeText(CardActivity.this, "3번 선택", 1000).show();
						break;
					case R.id.imageView4:
						Toast.makeText(CardActivity.this, "4번 선택", 1000).show();
						break;
				}

			}
		});
	}
	
}